home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / turbovis / tvtool17.zip / COMBOBOX.H < prev    next >
Text File  |  1993-01-14  |  2KB  |  60 lines

  1. /*  Copyright (C) 1993   Marc Stern  (internet: stern@mble.philips.be)  */
  2.  
  3. #if defined( Uses_TComboBox ) && !defined( __TComboBox )
  4. #define __TComboBox
  5.  
  6.  
  7. class TComboBox : public TView
  8. {
  9. protected:
  10.            char *icon;
  11.            TInputLine  *link;
  12.            TGenCollection *list;
  13.  
  14. public:
  15.            TComboBox( const TRect&, TInputLine *, TGenCollection * );
  16.            TComboBox( TInputLine *, TGenCollection * );
  17.  
  18.            virtual void initBox( TInputLine *, TGenCollection * );
  19.  
  20.            virtual void draw();
  21.            TPalette& getPalette() const;
  22.            virtual void handleEvent( TEvent& event );
  23.            void shutDown();
  24. };
  25.  
  26.  
  27. class TComboViewer : public TListViewer
  28. {
  29. protected:
  30.            TGenCollection *list;
  31.  
  32. public:
  33.            TComboViewer( const TRect&, TGenCollection*, TScrollBar* );
  34.  
  35.            TPalette& getPalette() const;
  36.            virtual void getData( void * );
  37.            virtual void getData( char *, short, short );
  38.            virtual void getText( char *, short, short );
  39.            virtual void handleEvent( TEvent& );
  40.            virtual void newList( TGenCollection * );
  41.            virtual void setData( void * );
  42.            void shutDown();
  43. };
  44.  
  45.  
  46. class TComboWindow : public TWindow
  47. {
  48. protected:
  49.            TComboViewer *viewer;
  50.  
  51. public:
  52.            TComboWindow( const TRect&, TGenCollection* );
  53.  
  54.            TPalette& getPalette() const;
  55.            void getSelection( char * );
  56.            virtual void handleEvent( TEvent& );
  57. };
  58.  
  59. #endif
  60.